home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 122_01 / stack < prev    next >
Text File  |  1984-03-05  |  3KB  |  115 lines

  1. MENU FOR STACK RELATED WORDS:
  2. copyright (C) 1983 by E. E. Bergmann
  3. definitions in alphabetical(ASCII) order.
  4. explanation of FFT,TFT,NTT,TOS
  5. :
  6. ::
  7. *********************************************************
  8. *                            *
  9. * PISTOL-Portably Implemented Stack Oriented Language    *
  10. *            Version 2.0            *
  11. * (C) 1983 by    Ernest E. Bergmann            *
  12. *        Physics, Building #16            *
  13. *        Lehigh Univerisity            *
  14. *        Bethlehem, Pa. 18015            *
  15. *                            *
  16. * Permission is hereby granted for all reproduction and *
  17. * distribution of this material provided this notice is *
  18. * included.                        *
  19. *                            *
  20. *********************************************************
  21. :
  22. ::
  23. .V    Vocabulary stack pointer
  24.  
  25. 2OVER    TFT NTT TOS --> TFT NTT TOS TFT
  26.  
  27. 3OVER    FFT TFT NTT TOS --> FFT TFT NTT TOS FFT
  28.  
  29. <R    S: TOS -->
  30.     R:     --> TOS
  31.     {pushes TOS onto Return Stack.}
  32.  
  33. >    Pops (discards) top (most recent) entry from
  34.     Vocabulary Stack.  Changes search path for 
  35.     stored definitions.
  36.  
  37. CASE@    TOS --> CASESTACK[CASESTACKPOINTER-TOS]
  38.  
  39. CHKLMT    Constant that specifies the maximum size of the
  40.     Check stack (that is used to check syntax and
  41.     which appears as part of the prompt).
  42.  
  43. DDUP    NTT TOS --> NTT TOS NTT TOS
  44.  
  45. DUP    TOS --> TOS TOS
  46.  
  47. L@    TOS --> LOOPSTACK[LOOPSTACKPOINTER-TOS]
  48.  
  49. LSIZE    Constant that specifies the size of the LOOPSTACK.
  50.     {a DO-LOOP takes three levels}.
  51.  
  52. PISTOL<    Pushes the PISTOL vocabulary on the top of the
  53.     Vocabulary Stack.  Thus the first set of definitions
  54.     in the search path will then be the "standard PISTOL"
  55.     definitions.
  56.  
  57. R@    TOS --> RETURNSTACK[RETURNSTACKPOINTER-TOS]
  58.  
  59. R>    Transfers the top of the Return Stack onto the top
  60.     of the (Parameter) Stack.
  61.  
  62. RP    --> (current number of items on Return Stack)
  63.     {"Return Stack Pointer"}.
  64.  
  65. RSIZE    Constant indicating the maximum capacity of the
  66.     Return Stack.
  67.  
  68. RSTACK    Displays the current size and contents of the
  69.     Return Stack. {No side effects other than i/o}.
  70.  
  71. S@    TOS --> STACK[STACKPOINTER-TOS]
  72.     { "0 S@" produces the same result as "DUP" }.
  73.  
  74. SP    --> (number of items on Parameter Stack)
  75.     {"Stack Pointer".}
  76.  
  77. SSIZE    Constant indicating the maximum size of the
  78.     (Parameter) Stack.
  79.  
  80. STACK    Displays the current size and contents of the
  81.     (Parameter) Stack. {No side effects other than i/o}.
  82.  
  83. SYNTAXBASE
  84.     Provides pointer to string area where the Syntax
  85.     Checking Stackpointer resides; immediately above
  86.     the contents of the Check Stack are located.
  87.     {"SYNTAXBASE MSG" would produce a display of the
  88.      part of the prompt that shows which structures
  89.      have been entered, but not yet exited during
  90.      compilation.}
  91.  
  92. UNDER    NTT TOS --> TOS
  93.  
  94. UNLINKED<
  95.     Places on top of the Vocabulary Stack the "Unlinked"
  96.     Vocabulary.  This vocabulary contains definitions
  97.     that have subsequently been UNLINKed (probably because
  98.     of their obscurity or danger).
  99.  
  100. VSIZE    Constant indicating the maximum capacity of the
  101.     Vocabulary Stack.
  102.  
  103. :
  104. ::
  105.  
  106.     TOS - "Top Of Stack"
  107.  
  108.     NTT - "Next To Top" of stack
  109.  
  110.     TFT - "Third From Top" of stack
  111.  
  112.     FFT - "Fourth From Top" of stack
  113.  
  114. :
  115. r of items on Paramet